﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;



namespace MiaProject
{
    class MenuItem
    {
        public int id;
        public String title;

        public float selectionFade;
        public bool isSelected;
        public bool selectable;

        public MenuItem(int id,String title,bool selectable)
        {
            this.selectionFade = 0.0f;
            this.isSelected = false;
            this.id = id;
            this.title = title;
            this.selectable = selectable;
        }

        public void update(GameTime gameTime)
        {
            float fadeSpeed = (float)gameTime.ElapsedGameTime.TotalSeconds * 4;

            if(isSelected)
                selectionFade = Math.Min(selectionFade + fadeSpeed, 2);
            else
                selectionFade = Math.Max(selectionFade - fadeSpeed, 0);

        }
        

    }
}
